At present, along with the promotion of the international process of mobile phone terminals, continuous expanding of the market size and continuous updating of techniques enable the mobile phone get unprecedented breakthroughs in aspects such as varieties, appearances, and functions, etc., and meanwhile also get expansion and go deep in aspects such as operating systems, chips, and wireless transmission standards, etc. At the same time, a huge demand growth for JAVA is also generated in the mobile phone market. A function supporting the JAVA virtual machine becomes particularly important, and the JAVA virtual machine based on an embedded platform has already become a mandatory requirement for the mobile phone (especially the customized mobile phone) of the most of the mainstream operators. General customers, operators, service/content providers and the mobile phone manufacturers are strongly eager for a more powerful JAVA performance on the mobile phone, supporting more numerous and more complex applications, and producing more business opportunities and incomes for all parties in industrial chain, and meanwhile also bringing more rich and colorful value-added applications to the users.
It is well known that the cross-platform capability of the JAVA virtual machine enables the capability of the mobile phone to be improved continuously. However, how to improve the performance of the JAVA virtual machine at the same time when new services are continuously expanded for the operators and more abundant value-added services are brought to the users is also a problem that requires considering deeply. Loading the picture resources is one of the factors which affect the performance of the JAVA virtual machine. At present, there are two main ways for loading the picture resources by the JAVA virtual machine.
The first way for loading the picture resources is that: firstly the picture resources required by the JAVA virtual machine are performed with a ROM, that is, the picture resources are decoded into the original data (mainly referring to the lattice array of the information, such as the color value and the transparency, etc., that describes each pixel of the picture), and then the original data are integrated into an executable file or a library of the JAVA component when being compiled. When the JAVA virtual machine runs, it directly reads the picture data from the executable file or the jvm library to perform the loading. The advantage of this method is that the process of loading the picture by the JAVA virtual machine is simple, and the original data are directly read from the memory to perform the loading. However, the disadvantage is also more obvious that: on the one hand, the size of the executable file or the library of the JAVA component is increased, which increases the overhead of the mobile phone memory; on the other hand, the JAVA virtual machine version should be re-compiled when a certain picture resource of the JAVA virtual machine changes, in which the picture resources cannot be flexibly configured and the management difficulty of the version in increased in a large scale project customization with a large number of platforms and model machines.
The second way for loading the picture resources is to load the picture resources by using the way of the file system reading the picture resources. That is, when the JAVA virtual machine starts, the picture resources are read from the file system, the required picture resources are decoded to obtain the original data that are not coded and compressed, and then loading is performed. This method increases the time of decoding the pictures in the current condition that there are abundant and a large number of picture resources, which will severely affect the picture loading speed, thereby affecting the user experience.
Now all the existing methods for loading the picture resources by the JAVA virtual machine have their own disadvantages. Especially, the disadvantage of the method for loading the picture resources by the current JAVA virtual machine is particularly obvious in the condition that the capability of the current mobile phone terminal are continuous improved. For example, at present, in order to satisfy the requirement for personalizing graphical interfaces of the user, the mobile phone terminal interface always allows the user to select and switch the interface style. As an important component of the mobile phone terminal, the JAVA virtual machine should correspondingly change its own interface style according to the change of the interface style at the platform side. However, it is difficult to implement this change by using the current existing method for loading the picture resources by the JAVA virtual machine.
In summary, it can be seen that the existing methods for loading the picture resources by the JAVA virtual machine have their own inconveniences and drawbacks in the practical use, so it is necessary to improve.